#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: node07_type_modification.py 
@version:
@time: 2022/05/18 
"""
# 04
from TapClientCore.T04_logic.Dag02.node.operate_node.node08_field_rename import FieldRenameNode


class TypeModification(FieldRenameNode):
    """
    [{"id":"6283cd914f15a8260b44ebef",
    "op":"CONVERT",
    "field":"column_1",
    "operand":"Double",
    "table_name":"AA",
    "type":"Long",
    "primary_key_position":0,
    "label":"column_1",
    "field_name":"column_1"}]}]
    """

    def generate_node(self, operations):
        node = {
            "id": self.newId,
            "name": "自动化-类型修改",
            "type": "field_mod_type_processor",
            "attrs": {
                "position": [
                    -500,
                    200
                ]
            },
            "operations": operations
        }
        self.node = node
